package indi.cloud.common.convert;

import java.math.BigDecimal;

/**
 * @author yangyifan
 * @version 1.0
 * @date 2024/2/2 16:09
 * @Description
 */
public enum UnitEnum {
    //不保留位数
    Decimal0(0, BigDecimal.class),
    //保留一位小数
    Decimal1(1, BigDecimal.class),
    Decimal2(2, BigDecimal.class),
    Decimal3(3, BigDecimal.class),
    Decimal4(4, BigDecimal.class),
    Decimal5(5, BigDecimal.class),
    Decimal6(6, BigDecimal.class),
    Decimal7(7, BigDecimal.class),
    Decimal8(8, BigDecimal.class),
    Decimal9(9, BigDecimal.class),
    Decimal10(10, BigDecimal.class),
    //千分位
    THOUSANDTH("THOUSANDTH", String.class);

    public Integer numberSale;
    public Class returnType;
    public String typeName;


    UnitEnum(String typeName, Class returnType) {
        this.typeName = typeName;
        this.returnType = returnType;
    }

    UnitEnum(Integer numberSale, Class returnType) {
        this.numberSale = numberSale;
        this.returnType = returnType;
    }

    public Integer getNumberSale() {
        return numberSale;
    }

    public void setNumberSale(Integer numberSale) {
        this.numberSale = numberSale;
    }

    public Class getReturnType() {
        return returnType;
    }

    public void setReturnType(Class returnType) {
        this.returnType = returnType;
    }

    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }
}
